ci: Exclude build tooling (resources/) from coverage#10561
Conversation
resources/buildConfigDefinitions.js is a build-time codegen tool, not shipped runtime code. Its generation pipeline only runs on direct execution (require.main === module), so it can't be exercised by the test suite, and it only exports mapperFor. Measuring it reports ~19% and drags the project coverage number down for code that isn't part of the product. Exclude resources/** from nyc instrumentation.
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
📝 WalkthroughWalkthroughThe ChangesCoverage configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (6 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #10561 +/- ##
==========================================
+ Coverage 92.69% 93.55% +0.85%
==========================================
Files 193 192 -1
Lines 17027 16832 -195
Branches 248 248
==========================================
- Hits 15784 15747 -37
+ Misses 1222 1064 -158
Partials 21 21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@dblythy Please let CR review first before requesting a human review, thanks. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Thanks @mtrezza 🤩 |
|
🎉 This change has been released in version 9.10.1-alpha.4 |
Issue
resources/buildConfigDefinitions.jsis a build-time codegen tool (run vianpm run definitions), not shipped runtime code. It's currently measured for coverage at ~19% (158 uncovered lines), which drags the project coverage number down for something that isn't part of the product.Approach
Exclude
resources/**from nyc instrumentation. The bulk of the file is the codegen pipeline plus the file-read/write block guarded byif (require.main === module), which only runs on direct execution and can't be exercised by the test suite (the module only exportsmapperFor). Excluding build tooling from coverage is standard practice and reflects the project number on product code only.Tasks
Summary by CodeRabbit
resourcesdirectory from coverage results.